package com.dlc.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dlc.shop.bean.dto.ShopAuditingInfoDto;
import com.dlc.shop.bean.model.ShopAuditing;
import com.dlc.shop.bean.param.AuditingInfoParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 商家审核信息
 *
 * @author Dwl
 * @date 2019-09-19 14:02:57
 */
public interface ShopAuditingMapper extends BaseMapper<ShopAuditing> {

    /**
     * 根据申请人id查询审核信息
     *
     * @param userId 用户id
     * @return 审核信息
     */
    ShopAuditing getShopAuditingByUserId(String userId);


    /**
     * 店铺审核信息列表
     *
     * @param page              分页参数
     * @param auditingInfoParam 审核信息参数
     * @return 店铺审核信息列表
     */
    IPage<ShopAuditingInfoDto> auditingInfoList(@Param("page") Page<ShopAuditingInfoDto> page,
                                                @Param("map") AuditingInfoParam auditingInfoParam);

    /**
     * 更新商家申请开店为审核失败
     * @param shopIds
     */
    void updateToFail(@Param("shopIds") List<Long> shopIds);

}
